<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.Date" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<div class="modal-dialog x-modal-dialog" style="width: 600px; margin-top: 100px;">

  <div class="modal-content">

    <div class="modal-header x-breadcrumb no-bottom-border clearfix">

      <h2><i class="glyphicon glyphicon-search" title="过滤查询"></i>&nbsp;&nbsp;<span>逾期课时列表&nbsp;-&nbsp;过滤查询</span></h2>

      <button type="button" class="close" data-dismiss="modal">&times;</button>

    </div>

    <form class="form-horizontal" method="GET" action="${ctx.host}/expiry-schedules" data-validate="true">

      <input type="hidden" name="filter" value="true" >
	  <input type="hidden" name="week" value="${week}">
	  <input type="hidden" name="site" value="${site}">
	  	
      <div class="modal-body">

        <div class="form-group x-form-group">
          <label class="col-xs-4 control-label">学员名称</label>
          <div class="pull-left col-xs-6">
            <input type="text" class="form-control" name="name" value="${param.name}" placeholder="支持模糊查询"/>
          </div>
        </div>
        
        <div class="form-group x-form-group">
          <label class="col-xs-4 control-label">学员手机</label>
          <div class="pull-left col-xs-6">
            <input type="text" class="form-control" name="mobile" value="${param.mobile}" placeholder="" data-validate="mobile" />
          </div>
        </div>
        
        <div class="form-group x-form-group">
          <label class="col-xs-4 control-label">日期所在周</label>
          <div class="pull-left col-xs-6">
            <!--<c:set var="today" value="<%= new Date()%>"></c:set>-->
            <c:choose>
              <c:when test="${empty param.targetDate}">
              	<fmt:formatDate value="${targetDate}" var="todayFormat" pattern="yyyy-MM-dd" />
                <input type="text" class="form-control date" name="targetDate" value="${todayFormat}" data-validate="required" />
              </c:when>
              <c:otherwise>
                <input type="text" class="form-control date" name="targetDate" value="${param.targetDate}" data-validate="required" />
              </c:otherwise>
            </c:choose>
          </div>
        </div>
        
        <div class="form-group x-form-group">
          <label class="col-xs-4 control-label">课程类型</label>
          <div class="pull-left col-xs-6">
            <select name="courseType" class="form-control" >
              <option value="">所有课程</option>
              <option value="individual" ${courseType == 'individual' ? 'selected' : ''}>1V1课程</option>
              <option value="year" ${courseType == 'year' ? 'selected' : ''}>月卡季卡课程</option>
            </select>
          </div>
        </div>
      </div>

      <div class="modal-footer">
        <button type="submit" class="btn btn-success btn-shadow btn-shadow-success x-btn">查询</button>&nbsp;&nbsp;&nbsp;&nbsp;
        <button type="button" class="btn btn-default btn-shadow btn-shadow-default x-btn" data-dismiss="modal">取消</button>
      </div>
		
    </form>

  </div>
  
</div>

<script>
  $('.date').datetimepicker({
    format: 'yyyy-mm-dd',
    autoclose: true,
    language: 'zh-CN',
    todayBtn: 'linked',
    todayHighlight: true,
    pickerPosition: 'bottom-right',
    minView: 'month'
  });
</script>